<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('firstups', function (Blueprint $table) {
            $table->integer('game_channel_id')->comment('激活时渠道配置id')->unsigned()->default(0);
            $table->index('game_channel_id');
        });

        Schema::table('users', function (Blueprint $table) {
            $table->integer('game_channel_id')->comment('注册时渠道配置id')->unsigned()->default(0);
            $table->index('game_channel_id');
        });

        Schema::table('orders', function (Blueprint $table) {
            $table->integer('game_channel_id')->comment('渠道配置id')->unsigned()->default(0);
            $table->index('game_channel_id');
        });

        Schema::table('game_h5_to_apk_config', function (Blueprint $table) {
            $table->integer('game_channel_id')->comment('渠道配置id')->unsigned()->default(0);
            $table->index('game_channel_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
};
